package com.king.ml.enums


object TaskNameEnum extends Enumeration {

  def getEnumType(source:String):TaskNameEnum.Value = {
    val values =TaskNameEnum.values.toList.filter(_.toString.toUpperCase == source.toUpperCase)
    values.length match {
      case 1 => values.head
      case _ => throw new IllegalArgumentException("该任务不存在")
    }
  }

  val Test1 = Value("ods.ods_test1")
  val Test2 = Value("ods.ods_test2")


}
